package com.ruoyi.archive.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.archive.mapper.SFamilyOfIllnessSoldierMapper;
import com.ruoyi.archive.domain.SFamilyOfIllnessSoldier;
import com.ruoyi.archive.service.ISFamilyOfIllnessSoldierService;

/**
 * 病故军人遗属信息Service业务层处理
 *
 * @author Allen
 * @date 2021-09-30
 */
@Service
public class SFamilyOfIllnessSoldierServiceImpl extends ServiceImpl<SFamilyOfIllnessSoldierMapper, SFamilyOfIllnessSoldier> implements ISFamilyOfIllnessSoldierService {
    @Autowired
    private SFamilyOfIllnessSoldierMapper sFamilyOfIllnessSoldierMapper;

    /**
     * 查询病故军人遗属信息
     *
     * @param id
     *         病故军人遗属信息主键
     *
     * @return 病故军人遗属信息
     */
    @Override
    public SFamilyOfIllnessSoldier selectSFamilyOfIllnessSoldierById(Long id) {
        return sFamilyOfIllnessSoldierMapper.selectSFamilyOfIllnessSoldierById(id);
    }

    /**
     * 查询病故军人遗属信息列表
     *
     * @param sFamilyOfIllnessSoldier
     *         病故军人遗属信息
     *
     * @return 病故军人遗属信息
     */
    @Override
    public List<SFamilyOfIllnessSoldier> selectSFamilyOfIllnessSoldierList(SFamilyOfIllnessSoldier sFamilyOfIllnessSoldier) {
        return sFamilyOfIllnessSoldierMapper.selectSFamilyOfIllnessSoldierList(sFamilyOfIllnessSoldier);
    }

    /**
     * 新增病故军人遗属信息
     *
     * @param sFamilyOfIllnessSoldier
     *         病故军人遗属信息
     *
     * @return 结果
     */
    @Override
    public int insertSFamilyOfIllnessSoldier(SFamilyOfIllnessSoldier sFamilyOfIllnessSoldier) {
        if (sFamilyOfIllnessSoldier != null) {
            return sFamilyOfIllnessSoldierMapper.insertSFamilyOfIllnessSoldier(sFamilyOfIllnessSoldier);
        }
        return 0;
    }

    /**
     * 修改病故军人遗属信息
     *
     * @param sFamilyOfIllnessSoldier
     *         病故军人遗属信息
     *
     * @return 结果
     */
    @Override
    public int updateSFamilyOfIllnessSoldier(SFamilyOfIllnessSoldier sFamilyOfIllnessSoldier) {
        return sFamilyOfIllnessSoldierMapper.updateSFamilyOfIllnessSoldier(sFamilyOfIllnessSoldier);
    }

    /**
     * 批量删除病故军人遗属信息
     *
     * @param ids
     *         需要删除的病故军人遗属信息主键
     *
     * @return 结果
     */
    @Override
    public int deleteSFamilyOfIllnessSoldierByIds(Long[] ids) {
        return sFamilyOfIllnessSoldierMapper.deleteSFamilyOfIllnessSoldierByIds(ids);
    }

    /**
     * 删除病故军人遗属信息信息
     *
     * @param id
     *         病故军人遗属信息主键
     *
     * @return 结果
     */
    @Override
    public int deleteSFamilyOfIllnessSoldierById(Long id) {
        return sFamilyOfIllnessSoldierMapper.deleteSFamilyOfIllnessSoldierById(id);
    }
}
